package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.ActivityPro;

public interface ActivityService extends IService<ActivityPro> {
    String saveActivityPro(ActivityPro activityPro);

    String deleteActivity(ActivityPro activityPro);

    //修改活动商品
    String updateActivity(ActivityPro activityPro);

    //获取用户已购买的最大数量
    Integer getMaxNumber(String userId,Long prodId);

    //获取用户最大购买数量
    ActivityPro getActivityProdByProdId(Long prodId);

    //获取用户的下单数量
    Integer getMaxOrderNumber(String userId,Long prodId);

    //获取具体店铺的活动商品
    IPage<ActivityPro> getActivityProdByShopId(Page<ActivityPro> page, Long prodId);
}
